/**
 * 深度遍历
 * 递归
 * @param {*} root 
 * @returns 
 */

var maxDepth = function(root) {
    const tools = (root,deep) => {
        if(!root) return deep
        return Math.max(tools(root.left,deep+1),tools(root.right,deep+1)) 
    }
    return tools(root,0)
}